package com.hqyj.system.service.impl;

import com.hqyj.system.mapper.UserPurchaseMapper;
import com.hqyj.system.model.UserPurchase;
import com.hqyj.system.service.UserPurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserPurchaseServiceImpl implements UserPurchaseService {
    @Autowired
    private UserPurchaseMapper userPurchaseMapper;

    @Override
    public List<UserPurchase> queryAllUserPurchase() {
        return userPurchaseMapper.queryAllUserPurchase();
    }

    @Override
    public int addUserPurchaseByUserPurchase(UserPurchase userPurchase) {
        return userPurchaseMapper.insertSelective(userPurchase);
    }

}
